package com.youlu.campus.activity.entity;

import com.youlu.campus.entity.enums.TaskBizType;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 用户参与活动 贡献值记录
 *
 * @Description: UserActivityQuantityRecord
 * @Date 2025/7/30
 * @module UserActivityQuantityRecord
 * @author: su
 */
@Data
@Document
public class UserActivityQuantityRecord {

    @Id
    private String id;

    /**
     * 用户id
     */
    @Indexed
    private String userId;

    /**
     * 活动id
     */
    @Indexed
    private String activityId;

    /**
     * 活动任务id
     */
    private String activityTaskInfoId;

    /**
     * 业务类型:attendance:打卡,ca:下单,invite:邀请,activity:活动,job:兼职,part-time-job:兼职
     */
    private TaskBizType taskBizType;

    /**
     * 受邀人id
     */
    @Indexed
    private String inviteToUserId;

    /**
     * 奖励值
     */
    private Double points = 0D;

    /**
     * 额外奖励值
     */
    private Double extraPoints = 0D;

    /**
     * 额外奖励值状态  true失效  false生效状态
     */
    @Indexed(background = true)
    private Boolean extraPointsStatus = true;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;
}
